#!/bin/bash
#Jenkins 部署使用脚本
#source /etc/profile
#export PLAY2_HOME="/usr/local/play/activator-1.2.12"
echo $1

echo "package talent..."
time  rm -rf lib/ target/
time  mvn clean   play2:copy-dependencies
time  activator compile #编译scala和java代码
#time  mvn -Dmaven.test.skip=true -P$1 resources:resources play2:package

rm -r lib/xercesImpl-2.6.2.jar
rm -r lib/spring-asm-3.0.5.RELEASE.jar

#update auth.properties
if [ "" = "$1" ] ; then
    cp -f conf/auth.properties.dev conf/auth.properties
elif [ "test" = "$1" ] ; then
    cp -f conf/auth.properties.test conf/auth.properties
elif [ "product" = "$1" ] ; then
    cp -f conf/auth.properties.product conf/auth.properties
fi

time  activator stage
